﻿<?php
Yii::import('application.modules.mii.MiiMigrations');
class AjaxController extends Controller
{
	public function actionIndex()
	{
		$miimigrations=new MiiMigrations();
		$migrations=$miimigrations->getAllMigrations();

		$this->render('index',array('migrations'=>$migrations, 'path'=>$path));
	}
	
	public function actionMigrateTo ()
	{
		$this->layout='ajax';
		$input = $_POST['version'];

		if(Yii::app()->request->isAjaxRequest){
				echo CHtml::encode($output);
				Yii::app()->end();
		}
		else {
				throw new CHttpException(404,'Вам сюда нельзя');
		}
	}
}